package uc.allapp;

import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.view.View;
import android.widget.GridView;
import android.widget.LinearLayout;
import android.widget.TextView;
import cn.onekit.COLOR;
import cn.onekit.android.ACTIVITY;
import co.chuangdian.oflauncher.R;

public class AllAppSection extends LinearLayout {
	public AllAppSection(Context context) {
		super(context);
		init();
	}

	public AllAppSection(Context context, AttributeSet attrs) {
		super(context, attrs);
		init();
	}

	void init() {

		View.inflate(getContext(), R.layout.uc_allappview_section, this);

		indexTextView = (TextView) findViewById(R.id.indexTextView);
		appGridView = (GridView) findViewById(R.id.appGridView);
	}

	TextView indexTextView;
	GridView appGridView;

	@SuppressLint("DrawAllocation")
	@Override
	protected void onDraw(Canvas canvas) {
		super.onDraw(canvas);
		Paint paint = new Paint();
		int width = this.getWidth() - ACTIVITY.dp2px(110);
		int height = this.getHeight();
		paint.setStrokeWidth(ACTIVITY.dp2px(0.5f));
		paint.setColor(COLOR.parse("#d8d8d8"));
		canvas.drawLine(ACTIVITY.dp2px(100), height - ACTIVITY.dp2px(1), width, height - ACTIVITY.dp2px(1), paint);
	}
}
